﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master"
    CodeBehind="Details.aspx.vb" Inherits="VW_Passat_Community.Details" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <style type="text/css">
        .style3
        {
            color: #FF0000;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <br />
    <asp:DetailsView ID="DetailsView1" runat="server" AutoGenerateRows="False" DataSourceID="SqlDataSource2"
        Height="50px" Width="236px" BackColor="White" BorderColor="#999999" BorderStyle="None"
        BorderWidth="1px" CellPadding="3" GridLines="Vertical" HorizontalAlign="Center">
        <AlternatingRowStyle BackColor="Gainsboro" Font-Bold="False" />
        <CommandRowStyle Font-Bold="False" />
        <EditRowStyle BackColor="#008A8C" Font-Bold="True" Font-Names="Calibri" Font-Size="Medium"
            ForeColor="White" />
        <FieldHeaderStyle Font-Bold="True" />
        <Fields>
            <asp:BoundField DataField="CarType" HeaderText="Type" SortExpression="CarType">
                <ControlStyle Font-Bold="True" Font-Size="Medium" />
                <ItemStyle Font-Bold="True" Font-Size="Medium" />
            </asp:BoundField>
            <asp:BoundField DataField="CarModel" HeaderText="Model" SortExpression="CarModel" />
            <asp:BoundField DataField="CarTransmission" HeaderText="Transmission" SortExpression="CarTransmission" />
            <asp:BoundField DataField="CarEngine" HeaderText="Engine" SortExpression="CarEngine" />
            <asp:BoundField DataField="CarYear" HeaderText="Year" SortExpression="CarYear" />
            <asp:BoundField DataField="CarFuel" HeaderText="Fuel" SortExpression="CarFuel" />
            <asp:BoundField DataField="CarColour" HeaderText="Colour" SortExpression="CarColour" />
            <asp:BoundField DataField="CarWheelSize" HeaderText="WheelSize" SortExpression="CarWheelSize" />
            <asp:CheckBoxField DataField="CarBluetooth" HeaderText="Bluetooth" SortExpression="CarBluetooth"
                ControlStyle-CssClass="squaredTwo" />
            <asp:CheckBoxField DataField="CarNavigation" HeaderText="Navigation" SortExpression="CarNavigation"
                ControlStyle-CssClass="squaredTwo" />
            <asp:CheckBoxField DataField="CarSecurity" HeaderText="Security" SortExpression="CarSecurity"
                ControlStyle-CssClass="squaredTwo" />
            <asp:CheckBoxField DataField="CarSunroof" HeaderText="Sunroof" SortExpression="CarSunroof"
                ControlStyle-CssClass="squaredTwo" />
            <asp:ImageField DataImageUrlField="Picture" HeaderText="Picture">
                <ControlStyle CssClass="carImageBig" />
            </asp:ImageField>
        </Fields>
        <FooterStyle BackColor="#CCCCCC" ForeColor="Black" />
        <HeaderStyle BackColor="#000084" Font-Bold="True" Font-Size="Medium" ForeColor="White" />
        <PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" />
        <RowStyle BackColor="#EEEEEE" Font-Size="Medium" ForeColor="Black" />
    </asp:DetailsView>
    <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
        ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" SelectCommand="SELECT [CarType], [CarModel], [CarTransmission], [CarEngine], [CarYear], [CarFuel], [CarColour], [CarWheelSize], [CarBluetooth], [CarNavigation], [CarSecurity], [CarSunroof], [Picture] FROM [Cars] WHERE ([CarID] = ?)">
        <SelectParameters>
            <asp:QueryStringParameter Name="CarID" QueryStringField="CarID" Type="Int32" />
        </SelectParameters>
    </asp:SqlDataSource>
    <br />
    <div style="overflow: auto; margin-bottom: 0px;">
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" CellPadding="4"
            DataSourceID="SqlDataSource1" ForeColor="#333333" GridLines="None" Width="575px"
            Height="100px">
            <AlternatingRowStyle BackColor="White" />
            <Columns>
                <asp:TemplateField HeaderText="Comments">
                    <ItemTemplate>
                        <div style="background-color: Silver">
                            <span style="background-color: Yellow">
                                <h4>
                                    <%# Eval("Author")%><br />
                                </h4>
                            </span>
                            <h3>
                                <%# Eval("Title")%><br />
                            </h3>
                            <%# Eval("Message") %><br />
                        </div>
                    </ItemTemplate>
                    <AlternatingItemTemplate>
                        <div style="background-color: White">
                            <span style="background-color: Yellow">
                                <h4>
                                    <%# Eval("Author")%><br />
                                </h4>
                            </span>
                            <h3>
                                <%# Eval("Title")%><br />
                            </h3>
                            <%# Eval("Message") %><br />
                        </div>
                    </AlternatingItemTemplate>
                </asp:TemplateField>
            </Columns>
            <EditRowStyle BackColor="#2461BF" />
            <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
            <RowStyle BackColor="#EFF3FB" />
            <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
            <SortedAscendingCellStyle BackColor="#F5F7FB" />
            <SortedAscendingHeaderStyle BackColor="#6D95E1" />
            <SortedDescendingCellStyle BackColor="#E9EBEF" />
            <SortedDescendingHeaderStyle BackColor="#4870BE" />
        </asp:GridView>
    </div>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
        ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" SelectCommand="SELECT [Author], [Title], [Message] FROM [Car_Comments] WHERE ([CarID] = ?)">
        <SelectParameters>
            <asp:QueryStringParameter Name="CarID" QueryStringField="CarID" Type="Int32" />
        </SelectParameters>
    </asp:SqlDataSource>
    <div>
        <span class="style3">Add Your Comment
            <asp:LoginName ID="LoginName1" runat="server" />
        </span>
        <br />
        Your Name<br />
        <asp:TextBox ID="txtName" runat="server" Width="232px"></asp:TextBox>
        <br />
        Title
        <br />
        <asp:TextBox ID="txtTitle" runat="server" Width="231px"></asp:TextBox>
        <br />
        Your Comment
        <br />
        <asp:TextBox ID="txtMessage" runat="server" Height="78px" Width="231px" TextMode="MultiLine"></asp:TextBox>
        <br />
        <asp:Button ID="btnComment" runat="server" Text="Comment" CssClass="buttons" />
        <br />
    </div>
</asp:Content>
